/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 2013-2014 sagyf Yang. The Four Group.
 */

package app.models.booking;

import com.github.sog.annotation.TableBind;
import com.github.sog.plugin.sqlinxml.SqlKit;
import com.jfinal.plugin.activerecord.Model;

import java.util.Date;

/**
 * <p>
 * .
 * </p>
 *
 * @author sagyf yang
 * @version 1.0 2014-05-26 22:58
 * @since JDK 1.6
 */
@TableBind(tableName = "ol_dining_booking_time")
public class DiningTime extends Model<DiningTime> {
    /**
     * The public dao.
     */
    public static final DiningTime dao = new DiningTime();
    private static final long      serialVersionUID = 3979439411785747833L;


    public DiningTime findByBrandAndTime(long brandId, Date date) {
        return findFirst(SqlKit.sql("diningtime.findByBrandAndTime"), brandId, date);
    }

    public DiningTime findByBrand(long brand) {
        return  findFirst(SqlKit.sql("diningtime.findByBrand"), brand);
    }
}